<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:include="login::nav">
</div>
<div style="display: flex">
    <div style="flex: 1">
        <table border="1">
            <tr>
                <th>班级编号</th>
                <th>班级名称</th>
                <th>操作</th>
            </tr>
            <tr th:each="x:${clz}">
                <td th:text="${x.clzno}"></td>
                <td th:text="${x.clzname}"></td>
                <td><a th:href="'/admclz/go2update?clzno='+${x.clzno}">修改</a></td>
                <td><a th:href="'/admclz/del?clzno='+${x.clzno}">删除</a></td>
            </tr>
        </table>
    </div>
    <div style="flex: 1">
        <button><a href="/admclz/go2add">添加班级</a></button>
        <hr>
        <div th:if="${action}=='add'">
            <table border="1">
            <form action="/admclz/add" method="post">
                <tr><td>添加班级</td></tr>
                <tr><td>班级编号:</td><td><input type="text" name="clzno"/></td></tr>
                <tr><td>班级名称:</td><td><input type="text" name="clzname"/></td></tr>
                <tr><td></td><td><input  type="submit"/></td></tr>

            </form>
            </table>
        </div>
        <div th:if="${action}=='update'">
            <form action="/admclz/update" method="post">
                <h2>修改班级</h2>
                班级编号:<input type="text" name="clzno" th:value="${clz}"/><br>
                班级名称:<input type="text" name="clzname"/><br>
                <input  type="submit"/>
            </form>
        </div>
    </div>
</div>
</body>
</html>